import Vuex from 'vuex'
import Vue from 'vue'
import createPersistedState from 'vuex-persistedstate'


Vue.use(Vuex) 

export default new Vuex.Store({
  state: {
    userId: ''
  },
  mutations: {
    setUserId(state, userId){
      state.userId = userId;
    }
  },
  getters:{
    getUserId: state =>{
      return state.userId;
    }
  },
  plugins: [createPersistedState()] 

})